Jump to content

Recommended Posts

Posted

Hello,

Need to create blocks (VRF cassette for example) that have a special connection point (snap point) so there should be a lisp code to draw polyline (piping) when pointed to our block it snaps only to the special connection point.

Posted

Not a problem you just need to know the radial relationship of the desired point its length and angle compared to the insertion point, once the block is rotated you adjust angle same with scale factor for distance.

 

; a start
(setq ent (entsel "pick block"))
(setq inspt (assoc 10 (entget (car ent)))) ;insert pt
(setq newpt (polar inspt 20 123)) ;desired pt 
; you need say a cond to set distance and angle for different blocks.

Posted

Could you make that point the 'insertion' point of the block? Then when using the lisp code, simple turn off all the osnaps except the insertion one (then reset the users osnaps back to what they were prior to the lisp once complete)?

Posted
Could you make that point the 'insertion' point of the block? Then when using the lisp code, simple turn off all the osnaps except the insertion one (then reset the users osnaps back to what they were prior to the lisp once complete)?

 

I agree - Or if there is more than one such point, you could use point objects in the block definition and activate only the NODE snap.

Posted

The point is already determined in the block (connection valve point of the air conditioner for example).

Posted

I believe I have answered your question you can have as many connection points as you like water out, power, valve1, etc just ask a question which connection do you desire so you know the angle and distance to that point. W P In Out then use a cond to test.

 

The only complication I can think of is do you start or end at this point when creating the pline ? Do you join two blocks ?

Posted (edited)

i do joint two different blocks (for example block 1 indoor air conditioner block 2 outdoor air conditioner ).

I want to draw piping path (polyline) starting from block 1 and continuously drawing the polyline until we arrive to the block 2.

Edited by fathihvac
spelling correction
Posted

Can be done like I have said,

method

pick block 1 Power, Water or Gasline P W G

pick block 2 it knows you want power

pick pline points & draw answer

 

Sorry no code really need some blocks from you a dwg with two blocks and the points clearly marked.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...